<template>
  <common-search-wrap @search="search" @reset="searchReset">
    <el-form ref="formRef" :inline="true" :model="formData">
      <el-form-item label="平台名称：" prop="plateName">
        <el-input v-model="formData.plateName" placeholder="请输入平台名称" clearable />
      </el-form-item>
      <el-form-item label="平台投手账号：" prop="platformAccount">
        <el-input v-model="formData.platformAccount" placeholder="请输入平台投手账号" clearable />
      </el-form-item>
    </el-form>
  </common-search-wrap>
</template>

<script setup>
import commonSearchWrap from "@/components/commonSearchWrap.vue";
import { reactive } from "vue";
import useForm from '@/hooks/useForm'
const emits = defineEmits(['submit'])
/** 搜索的方法 */
const handleSearch = () => {
  emits('submit', formData)
}
const { formRef, search, reset } = useForm(handleSearch)
const formData = reactive({
  plateName: '',
  platformAccount: ''
});
const searchReset = () => {
  reset()
  handleSearch()
}
</script>